'use strict';

const Controller = require('egg').Controller;

class HelloController extends Controller {
    async get() {
        const { ctx } = this;
        console.log(ctx.request.url);
        ctx.body = {
            "路由地址": ctx.request.url,
            "提示信息": "Get方法不被使用，请使用更安全的Post方法",
        };
    }
    async post() {
        const { ctx } = this;
        console.log(ctx.request.url);
        ctx.body = {
            "路由地址": ctx.request.url,
            "提示信息": `路由表中没有匹配项，请检查请求URL。`,
        };
    }
}

module.exports = HelloController;